<template>
  <el-dialog title="设置连单" :visible.sync="visible" :close-on-click-modal="false"
    :before-close="handleCloseDialog" width="1000px">
    <el-card class="filter-container" shadow="never">
        <div>
          <el-button style="float:right" type="primary" @click="handleSubmit()" size="mini">
            提交
          </el-button>
        
        </div>
        <div>
          <el-form :inline="true" size="mini" label-width="100px">
            <el-form-item label="开始连单：">
              <el-input v-model="form.ids" class="input-width" style="width: 760px;" placeholder="几单后开始连单" clearable></el-input>
            </el-form-item>
          </el-form>
        </div>
      </el-card>
      <div class="top-container">
        <div>当前连单设置:0</div>
        <div>当前连单已做单数:0</div>
        <div>今日接单量:0</div>
        <div>等级最大接单量:15</div>
      </div>
      <div class="search-container">
        <el-input v-model="search.amount" class="input-width" size="mini" style="width:220px;" placeholder="搜索价格300-500" clearable></el-input>  
        <el-button type="primary" @click="handleSearch()" size="mini" icon="el-icon-search">
          搜索
        </el-button>
      </div>
      
      <div class="table-container">
          <el-table ref="adminTable" size="mini" :data="tableData" style="width: 100%;" v-loading="listLoading" border @selection-change="handleSelectionChange">
             <el-table-column
              type="selection"
              width="55">
           </el-table-column>
            <el-table-column label="广告ID" width="100" align="center">
              <template slot-scope="scope">{{ scope.row.id }}</template>
            </el-table-column>
            <el-table-column label="广告名称" align="center">
              <template slot-scope="scope">{{ scope.row.id }}</template>
            </el-table-column>
            <el-table-column label="广告价格" width="100" align="center">
               <template slot-scope="scope">{{ scope.row.id }}</template>
            </el-table-column>
            <el-table-column label="操作" width="100" align="center">
              <template slot-scope="scope">
                <el-button size="mini" type="text" @click="handleOrders(scope.row)"
                  >替换下一单</el-button>
              </template>
            </el-table-column>
          </el-table>
      </div>


    
    <span slot="footer" class="dialog-footer">
      <el-button @click="handleCloseDialog" size="mini">取 消</el-button>
    </span>
  </el-dialog>
</template>
<script>
import { createNamespacedHelpers } from "vuex";


export default {
  name: "ordersDialog",
  data() {
    return {
      loading: false,
      visible:true,
      form:{
        ids:[]
      },
      search:{
        amount:''
      },
      tableData:[]
    };
  },
  props: {
    row: {
      type: Object,
      default: {}
    },
   
  },
  mounted() {
    this.getLoad();
  },
  methods: {
    //初始化加载
    getLoad(){
      this.loading = true;

      this.loading = false;
    },
    // 搜索
    handleSearch(){

    },
    //提交
    handleSubmit(){

    },
    //替换下一单
    handleOrders(row){

    },
    //筛选选择广告id
    handleSelectionChange(val){

    },
    //关闭弹框
    handleCloseDialog() {
      this.$emit("handle-cancel");
    },
  }
};
</script>
<style scoped lang="scss">
 .top-container{
  margin-top: 15px;
  background: #f1f1f1;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #000;
  border-radius: 5px;
 }
 .search-container{
  margin-top: 15px;
 }
</style>